package com.dk.logc.kafka.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

@Data
public class BaseRoleFlog extends BaseFlog {

    protected String channelId;//渠道标识
    protected Integer serverNo;//服务器ID
    protected Date createTime;//产生本则日志消息时的时间
    protected Long userId;//用户ID
    protected Long chrId;//角色ID
    protected String chrName;//角色名
    protected Integer chrLevel;//角色等级
    protected Integer vipLevel;//VIP等级
    protected Long levelId;//当前关卡ID
    protected Long totalForce;//总战力

    public BaseRoleFlog() {
        super();
    }

    public BaseRoleFlog(BaseRoleFlog baseRoleFlog) {
        this.channelId = baseRoleFlog.channelId;
        this.serverNo = baseRoleFlog.serverNo;
        this.userId = baseRoleFlog.userId;
        this.chrId = baseRoleFlog.chrId;
        this.chrName = baseRoleFlog.chrName;
        this.chrLevel = baseRoleFlog.chrLevel;
        this.vipLevel = baseRoleFlog.vipLevel;
        this.levelId = baseRoleFlog.levelId;
        this.totalForce = baseRoleFlog.totalForce;
        this.createTime = new Date();
    }

    public static BaseRoleFlog newBaseRoleFlog(String channel_id, Integer server_no, Long user_id, Long chr_id, String chr_name, Integer chr_level, Integer vip_level, Long level_id, Long total_force) {
        BaseRoleFlog flog = new BaseRoleFlog();
        flog.channelId = channel_id;
        flog.serverNo = server_no;
        flog.userId = user_id;
        flog.chrId = chr_id;
        flog.chrName = chr_name;
        flog.chrLevel = chr_level;
        flog.vipLevel = vip_level;
        flog.levelId = level_id;
        flog.totalForce = total_force;
        flog.createTime = new Date();
        return flog;
    }

    @Override
    public String getCategory() {
        return "";
    }
}
